home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Freeware 2001 May
/
SGI Freeware 2001 May - Disc 2.iso
/
dist
/
fw_netpbm.idb
/
usr
/
freeware
/
catman
/
u_man
/
cat1
/
pgmtopbm.Z
/
pgmtopbm
Wrap
Text File
|
2001-01-10
|
5KB
|
133 lines
ppppggggmmmmttttooooppppbbbbmmmm((((1111)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22226666 JJJJuuuullllyyyy 1111999988888888)))) ppppggggmmmmttttooooppppbbbbmmmm((((1111))))
NNNNAAAAMMMMEEEE
pgmtopbm - convert a portable graymap into a portable bitmap
SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
ppppggggmmmmttttooooppppbbbbmmmm [----ffffllllooooyyyydddd|----ffffssss|----tttthhhhrrrreeeesssshhhhoooolllldddd |----hhhhiiiillllbbbbeeeerrrrtttt |----ddddiiiitttthhhheeeerrrr8888|----dddd8888|----
cccclllluuuusssstttteeeerrrr3333 |----cccc3333|----cccclllluuuusssstttteeeerrrr4444|----cccc4444 |----cccclllluuuusssstttteeeerrrr8888|----cccc8888] [----vvvvaaaalllluuuueeee _v_a_l] [----
cccclllluuuummmmpppp _s_i_z_e] [_p_g_m_f_i_l_e]
DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
Reads a portable graymap as input. Produces a portable
bitmap as output.
Note that there is no pbmtopgm converter, because any pgm
program can read pbm files automagically.
OOOOPPPPTTTTIIIIOOOONNNNSSSS
The default quantization method is boustrophedonic Floyd-
Steinberg error diffusion (----ffffllllooooyyyydddd or ----ffffssss). Also available
are simple thresholding (----tttthhhhrrrreeeesssshhhhoooolllldddd); Bayer's ordered dither
(----ddddiiiitttthhhheeeerrrr8888) with a 16x16 matrix; and three different sizes of
45-degree clustered-dot dither (----cccclllluuuusssstttteeeerrrr3333, ----cccclllluuuusssstttteeeerrrr4444, ----
cccclllluuuusssstttteeeerrrr8888). A space filling curve halftoning method using
the Hilbert curve is also available. (----hhhhiiiillllbbbbeeeerrrrtttt);
Floyd-Steinberg will almost always give the best looking
results; however, looking good is not always what you want.
For instance, thresholding can be used in a pipeline with
the _p_n_m_c_o_n_v_o_l tool, for tasks like edge and peak detection.
And clustered-dot dithering gives a newspaper-ish look, a
useful special effect.
The ----vvvvaaaalllluuuueeee flag alters the thresholding value for Floyd-
Steinberg and simple thresholding. It should be a real
number between 0 and 1. Above 0.5 means darker images;
below 0.5 means lighter.
The Hilbert curve method is useful for processing images
before display on devices that do not render individual
pixels distinctly (like laser printers). This dithering
method can give better results than the dithering usually
done by the laser printers themselves. The ----cccclllluuuummmmpppp flag
alters the number of pixels in a clump. This is usually an
integer between 2 and 100 (default 5). Smaller clump sizes
smear the image less and are less grainy, but seem to loose
some grey scale linearity. Typically a PGM image will have
to be scaled to fit on a laser printer page (2400 x 3000
pixels for an A4 300 dpi page), and then dithered to a PBM
image before being converted to a postscript file. A
printing pipeline might look something like: pnmscale
-xysize 2400 3000 image.pgm | pgmtopbm -hil | pnmtops -scale
0.25 > image.ps
Page 1 (printed 12/12/00)
ppppggggmmmmttttooooppppbbbbmmmm((((1111)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((22226666 JJJJuuuullllyyyy 1111999988888888)))) ppppggggmmmmttttooooppppbbbbmmmm((((1111))))
All flags can be abbreviated to their shortest unique
prefix.
RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
The only reference you need for this stuff is "Digital
Halftoning" by Robert Ulichney, MIT Press, ISBN 0-262-
21009-6.
The Hilbert curve space filling method is taken from
"Digital Halftoning with Space Filling Curves" by Luiz
Velho, Computer Graphics Volume 25, Number 4, proceedings of
SIGRAPH '91, page 81. ISBN 0-89791-436-8
SSSSEEEEEEEE AAAALLLLSSSSOOOO
pbmreduce(1), pgm(5), pbm(5), pnmconvol(1), pnmscale(1),
pnmtops(1)
AAAAUUUUTTTTHHHHOOOORRRR
Copyright (C) 1989 by Jef Poskanzer.
Page 2 (printed 12/12/00)